//
//  SortView.m
//  ErWa
//
//  Created by 赵颜彬 on 16/3/9.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "SortView.h"

@implementation SortView


-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
}


/// 创建视图
- (void)createSubviews
{
    self.backImg = [[UIImageView alloc] initWithFrame:CGRectMake(self.bounds.size.width / 24, 10, self.bounds.size.width / 12 * 11, self.frame.size.height - 10)];
    _backImg.layer.cornerRadius = 10;
    _backImg.clipsToBounds = YES;
    _backImg.contentMode = UIViewContentModeScaleAspectFill;
    [self addSubview:_backImg];
    
    
    self.sortLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, _backImg.frame.size.width, _backImg.frame.size.height / 2)];
    _sortLabel.center = CGPointMake(self.center.x, _backImg.center.y);
    _sortLabel.font = [UIFont fontWithName:@"MarkerFelt-Thin" size:22];
    _sortLabel.textColor = [UIColor whiteColor];
    _sortLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_sortLabel];
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
